<template>
  <img src="../../../static/staticJC/images/event/chart.png" class="szg_chart" @click="initQChart()">
</template>

<script>

  export default {
    data(){
      return {}
    },
    methods: {
      initQChart(){
        let $this = this;
        try{
          wx.scanQRCode({
            needResult: 1,
            scanType: ["qrCode","barCode"],
            success: (res)=> {
              let data = res.resultStr;
              if(data == undefined || data == ""){
                layer.alert("请求失败");
              }else{
                DYD.getTypeByUrl(data,2)
              }
            }
          });
        }catch(e){
          layer.alert(JSON.stringify(e))
        }

      }
    }
  }



</script>
